define(function(){
		//init-定义地图链接数据
		var mapurlIP = "http://221.214.108.194:8060/iserver/services/";
		
		urlPingyin[0] = mapurlIP + "map-pingyin/rest/maps/控规";
		urlPingyin[1] = mapurlIP + "map-pingyin/rest/maps/总体规划";
		// urlPingyin[2] = mapurlIP + "map-pingyin/rest/maps/ZG市政规划";
		// urlPingyin[3] = mapurlIP + "map-pingyin/rest/maps/ZG防灾景观规划";
  //       urlPingyin[4] = mapurlIP + "map-pingyin/rest/maps/ZG用地规划";
		
		//init-
		//urlData_1 = mapurlIP + "data-py016/rest/data";  
		urlData_1 = mapurlIP + "data-pingyin/rest/data";  
		urlData_2 = mapurlIP + "data-pingyin/rest/data";  // 仅多选统计and框选统计使用
		spaceData = mapurlIP + "spatialAnalysis-pingyin/restjsr/spatialanalyst" //空间分析
		//条件查询(sql)所需
		SqlSelectJson = [
			{
				"showName": "绿地率",
				"parameter": "绿地率",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}, {
				"showName": "地上容积率",
				"parameter": "容积率",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}, {
				"showName": "建筑密度",
				"parameter": "建筑密度",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}, {
				"showName": "人口",
				"parameter": "人口",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}, {
				"showName": "建筑面积",
				"parameter": "建筑面积",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}, {
				"showName": "面积",
				"parameter": "SHAPE_AREA",
				"name": "ZG用地规划",
				"url": mapurlIP + "map-pingyin/rest/data",
				"datasetNames": ["zonggui:ZG用地规划"]
			}
		];

	function onload(APP){
		//APP.two();
		//总体规划
		pingyinLayer[0] = new ol.layer.Tile({
			source: new ol.source.TileSuperMapRest({
				url: urlPingyin[0]
			}),
		});
		//控规
		pingyinLayer[1] = new ol.layer.Tile({
			source: new ol.source.TileSuperMapRest({
				url: urlPingyin[1]
			}),
		});
		
		
		view = new ol.View({
			center: [451343.84 , 4017036.9],
			zoom: 15
		});
		//地图的实时坐标和全屏显示
		//实例化全屏显示控件  
		var fullScreenControl = new ol.control.FullScreen();  
        //初始化鼠标位置控件  
        var mousePositionControl = new ol.control.MousePosition({  
            //样式类名称  
            className: 'mosuePosition',  
            //投影坐标格式，显示小数点后边多少位  
            coordinateFormat: ol.coordinate.createStringXY(4),  
            //指定投影  
            projection: 'EPSG:4326',  

            //目标容器  
            target:document.getElementById('myposition')  
        });  			  

		map = new ol.Map({
	    	layers: pingyinLayer,
			target: 'mapDiv',
			controls: ol.control.defaults({attributionOptions: {collapsed: false}}),
			view: view
		});
		 //将鼠标位置坐标控件加入到map中  
        map.addControl(mousePositionControl);  
         //将全屏显示控件加载到map中  
		map.addControl(fullScreenControl);  
		//添加鹰眼控件
	    map.addControl(new ol.control.OverviewMap({
	        view: new ol.View({
	           // projection: 'EPSG:4326'
	        }),
	        collapsed: false,
	    }));
	    //比例尺
	    zoomControl = new ol.control.ScaleLine();
        map.addControl(zoomControl);
		source = new ol.source.Vector({wrapX: false});

		//清除右下角 控件的显示
		$('.ol-viewport > .ol-overlaycontainer-stopevent > .ol-attribution').remove();
	}
	
	return {
		onload: onload
	};
	
});
